package com.adeoservices.gwt.dispatch.spring.server.security;

import net.customware.gwt.dispatch.server.ExecutionContext;
import net.customware.gwt.dispatch.shared.ActionException;

import org.springframework.stereotype.Component;

import com.adeoservices.gwt.dispatch.spring.server.handler.SpringActionHandler;

@Component
@Permission(verifier = NegativePermissionVerifier.class)
public class ActionHandlerDenied extends
		SpringActionHandler<ActionDenied, ResultDenied> {

	@Override
	public ResultDenied execute(ActionDenied action, ExecutionContext context)
			throws ActionException {

		System.out.println("dans test machin");
		return new ResultDenied();
	}

	@Override
	public Class<ActionDenied> getActionType() {
		return ActionDenied.class;
	}

	@Override
	public void rollback(ActionDenied action, ResultDenied result,
			ExecutionContext context) throws ActionException {
	}
}
